public class BankCardDemo08 {
    public static void main(String[] args) {
        BankCard bankCard = new BankCard("中国银行", "123456", "123456", 10000, "黑色");
        BankCard bankCard1 = new BankCard("工商银行", "12345", "12345", 1000, "黑色");

        // 取钱
        boolean res = bankCard.withDraw(1000);
        System.out.println(res ? "成功" : "失败");
        System.out.println(bankCard.getBalance());

        //存钱
        boolean res1 = bankCard.saveMoney(2000);
        System.out.println(res1 ? "成功" : "失败");
        System.out.println(bankCard.getBalance());
        // 转账

        boolean res2 = bankCard.transFerAccounts(bankCard1, 3000);
        System.out.println(res2 ? "成功" : "失败");
        System.out.println(bankCard.getBalance());
        System.out.println(bankCard1.getBalance());
    }
}
